package com.ygqh.baby.controller.open;

import javax.servlet.http.HttpServletRequest;

import com.ygqh.baby.ao.ResponseEntity;
import com.ygqh.baby.controller.mobile.BaseController;

public class KidsBaseController extends BaseController{
	private final static String KIDS_TOKEN = "94cec8cc41a34f3da31f3c86294098cc";
	
	protected ResponseEntity validToken(HttpServletRequest request) {
		String token = request.getParameter("token");
		if (token == null) {
			return ResponseEntity.error("token is null");
		}
		if (!token.equals(KIDS_TOKEN)) {
			return ResponseEntity.error("token is error");
		}
		return ResponseEntity.success();
	}
}
